package com.webServer.core;

import com.webServer.http.HttpServletRequest;
import com.webServer.http.HttpServletResponse;

import java.io.IOException;
import java.net.Socket;

/**
 * @Auther:SYZ
 * @Date:2022/8/2 - 08 - 02 - 10:59
 * @Description:
 *          对建立连接的客户端进行信息交互.
 *          处理流程为:
 *              1.解析请求
 *              2.处理请求
 *              3.响应请求
 * @version:1.0
 */
public class ClientHandler implements Runnable{
    private Socket socket;

    public ClientHandler(Socket socket) {
        this.socket = socket;
    }

    public void run() {
        try {
            //1.解析请求
            HttpServletRequest request = new HttpServletRequest(socket);
            HttpServletResponse response = new HttpServletResponse(socket);
            //2.处理请求
            //3.响应请求





        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
